﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Roton2.TextModeEmulation
{
    /// <summary>
    /// Renderer that produces no video output.
    /// </summary>
    public class NullRenderer : IRenderer
    {
        /// <summary>
        /// Returns false. NullRenderer has no screen buffer.
        /// </summary>
        public bool CanRead
        {
            get { return false; }
        }

        /// <summary>
        /// Returns false. NullRenderer cannot be written to.
        /// </summary>
        public bool CanWrite
        {
            get { return false; }
        }

        /// <summary>
        /// Throws InvalidOperationException if used. NullRenderer cannot be read.
        /// </summary>
        public AnsiChar Read(int x, int y)
        {
            throw new InvalidOperationException();
        }

        /// <summary>
        /// Throws InvalidOperationException if used. NullRenderer cannot be written.
        /// </summary>
        public void Write(int x, int y, AnsiChar ac)
        {
            throw new InvalidOperationException();
        }
    }
}
